package com.dataobject;

import java.util.Calendar;

public class MyReminder {
	private int _Id;
	private String _Ico;
	private String _Title;
	private String _Content;
	private Calendar _DateTime;
	private String _Alarm;
	private String _Tone;

	public MyReminder() {
		_DateTime = Calendar.getInstance();
		_Alarm = "Im lặng";
	}

	public MyReminder(MyReminder mr) {
		_Id = mr.get_Id();
		_Ico = mr.get_Ico();
		_Title = mr.get_Title();
		_Content = mr.get_Content();
		_DateTime = (Calendar) mr.get_DateTime().clone();
		_Alarm = mr.get_Alarm();
		_Tone = mr.get_Tone();
	}

	public MyReminder(int id, String ico, String title, String content,
			long miliseconds, String alarm, String tone) {
		_Id = id;
		_Ico = ico;
		_Title = title;
		_Content = content;
		_DateTime = Calendar.getInstance();
		_DateTime.setTimeInMillis(miliseconds);
		_Alarm = alarm;
		_Tone = tone;
	}

	public int get_Id() {
		return _Id;
	}

	public void set_Id(int _Id) {
		this._Id = _Id;
	}

	public String get_Ico() {
		return _Ico;
	}

	public void set_Ico(String _Ico) {
		this._Ico = _Ico;
	}

	public String get_Title() {
		return _Title;
	}

	public void set_Title(String _Title) {
		this._Title = _Title;
	}

	public String get_Content() {
		return _Content;
	}

	public void set_Content(String _Content) {
		this._Content = _Content;
	}

	public Calendar get_DateTime() {
		return _DateTime;
	}

	public void set_DateTime(long miliseconds) {
		this._DateTime.setTimeInMillis(miliseconds);
		this._DateTime.set(Calendar.SECOND, 0);
		this._DateTime.set(Calendar.MILLISECOND, 0);
	}

	public String get_Alarm() {
		return _Alarm;
	}

	public void set_Alarm(String _Alarm) {
		this._Alarm = _Alarm;
	}

	public String get_Tone() {
		return _Tone;
	}

	public void set_Tone(String _Tone) {
		this._Tone = _Tone;
	}

	public boolean equals(MyReminder mr) {
		if (_Ico.equals(mr.get_Ico()) && _Title.equals(mr.get_Title())
				&& _Content.equals(mr.get_Content())
				&& _DateTime.equals(mr.get_DateTime())
				&& _Alarm.equals(mr.get_Alarm())) {
			if (_Alarm.equals("Im lặng"))
				return true;
			else {
				if (_Tone.equals(mr.get_Tone()))
					return true;
			}

		}
		return false;
	}
}
